<template>
  <div>
    <svg-icon icon-class="fullscreen" style="color:#fff; width: 20px; height: 20px" @click="changeScreen" />
  </div>
</template>

<script>
import ScreenFull from 'screenfull'
export default {
  methods: {
    changeScreen() {
      if (!ScreenFull.isEnabled) {
        this.$message.warning('当前无法全屏')
        return
      }
      ScreenFull.toggle() // 全屏和退出全屏
    }
  }
}
</script>

<style>

</style>
